package com.csust.automaticteach.model.enums;


import lombok.Getter;

@Getter
public enum GeneratePptStatusEnum {
    BUILDING("building",5),
    DONE("done",1),
    BUILD_FAILED("build_failed",6);

    private final String text;
    private final Integer value;

    GeneratePptStatusEnum(String text, Integer value) {
        this.text = text;
        this.value = value;
    }
    public static Integer getValueByText(String text) {
        for (GeneratePptStatusEnum value : GeneratePptStatusEnum.values()) {
            if (value.getText().equals(text)) {
                return value.getValue();
            }
        }
        return null;
    }

}

